import React, { useEffect, useState } from "react";
// import { useSelector } from 'react-redux';
// 导入带有类型的属性，方法 1.
import { useAppDispatch, useAppSelector } from "./hooks";
// 导入仓库 1.
import { add, reduce, selectCount } from "./store/systemSlice";
// type Props = {};
import "./App.scss";
// 使用仓库
// {}: Props
// 调用api 1.导入
import { ApiGetHomeData } from "./utils/api";

import { Button, Space } from "antd-mobile";
import { Outlet } from "react-router-dom";


export default function App() {
  // 导入仓库 2.使用属性
  // const count = useAppSelector((state) => state.system.count);
  const count = useAppSelector(selectCount);
  // 导入仓库 2.使用方法
  const dispatch = useAppDispatch();


  return (
    <div className="box">
      {/* <button onClick={() => dispatch(reduce())}>-</button>
      {count}
      <button onClick={() => dispatch(add())}>+</button> */}
      {/* <Button>按钮</Button> */}
      <Outlet></Outlet>
    </div>
  );
}
